﻿<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/general.xhtml">
        
        <!--  This was used for Part 10 Initial testing         
        <ui:define name="title"><h:outputText value="Main Flow" /></ui:define>
        <ui:define name="body"><h:outputText value="JSF Works Great" /></ui:define>        
        -->
        
        <ui:define name="title"><h:outputText value="Please Sign In" /></ui:define>
        <ui:define name="header"><h:outputText value="Please Sign In" /></ui:define>
        <ui:define name="footer"><h:outputText value="Maven * J2EE Java * JSF * PrimeFaces *  MySQL * Spring" /></ui:define>
        <ui:define name="content">
           
        
        <h:form id="loginForm">
        	<p:fieldset styleClass="fieldset" legend="Authentication Form">	
        		<p:messages id="messages" />
        		<h:panelGrid id="logPanelGrid" bgcolor="#FF9933" style="margin: auto; margin-top: 25px; text-align: right; border-radius: 22px 22px 22px 22px;" cellspacing="8" columns="3" border="0">
        			<h:panelGroup>
                        	<h:outputText value="User Name:" />
                            <h:outputText style="color: red" value="*  " /> 
                    </h:panelGroup>
	        		<p:inputText id="userName" value="" required="true" label="User Name" title="Enter your User Name!" />
	                <p:tooltip for="userName" styleClass="tooltip" showEvent="focus" hideEvent="blur" />
	                
	                <h:panelGroup>
                        	<h:outputText value="Enter Password:" />
                            <h:outputText style="color:red" value="*  " />
                    </h:panelGroup>
	                <p:password id="pass" value="" required="true" label="Password" title="Please enter a password!" />
	                <p:tooltip for="pass" styleClass="tooltip" showEvent="focus" hideEvent="blur" />
	                
	                <p:commandButton id="submitButton" action="signIn" update="logPanelGrid,messages" icon="ui-icon-check" value="Sign In" />
	                <p:commandButton id="newUserButton" action="newUser" immediate="true" icon="ui-icon-plus" value="Sign Up" />
                </h:panelGrid>
        	</p:fieldset>
        </h:form>
        
        </ui:define>
     
</ui:composition>